import request from '@/utils/request'

// 查询任务转发记录列表
export function listRecord(query) {
  return request({
    url: '/forward/record/list',
    method: 'get',
    params: query
  })
}

// 查询任务转发记录详细
export function getRecord(forwardId) {
  return request({
    url: '/forward/record/' + forwardId,
    method: 'get'
  })
}

// 新增任务转发记录
export function addRecord(data) {
  return request({
    url: '/forward/record',
    method: 'post',
    data: data
  })
}

// 修改任务转发记录
export function updateRecord(data) {
  return request({
    url: '/forward/record',
    method: 'put',
    data: data
  })
}

// 删除任务转发记录
export function delRecord(forwardId) {
  return request({
    url: '/forward/record/' + forwardId,
    method: 'put'
  })
}

// 导出任务转发记录
export function exportRecord(query) {
  return request({
    url: '/forward/record/export',
    method: 'get',
    params: query
  })
}

//查询子部门list
export function getChildDeptList(){
  return request({
    url: '/forward/record/getChildDeptList',
    method:'get'
  })
}

//科长获取下属信息
export function getMemberInfoList(){
  return request({
    url: '/forward/record/getMemberInfoList',
    method:'get'
  })
}

//获取当前用户的deptId
export function receiveDeptId(){
  return request({
    url: '/forward/record/receiveDeptId',
    method:'get'
  })
}

//添加转发记录到副表
export function addProcessRecord(data){
  return request({
    url:'/forward/record/addProcessRecord',
    method:'post',
    data:data
  })
}

//获取转发详情
export function getForwardDetail(forwardId){
  return request({
    url: '/forward/record/getForwardDetail/' + forwardId,
    method: 'get'
  })
}


//获取转发列表
export function listProcess(query){
  return request({
    url: '/forward/record/listProcess',
    method: 'get',
    params: query
  })
}
